package main

import (
	"gin-to-study/gin-to-study-ajax/Myfunction"

	"github.com/gin-gonic/gin"
)

//func Hello(context *gin.Context) {
//	context.HTML(200, "demo02.html", nil)
//}

func main() {
	r := gin.Default()

	r.LoadHTMLGlob("gin-to-study-ajax/templates/**/*")

	r.Static("static", "gin-to-study-ajax/static")
	r.GET("/demo", Myfunction.Hello1)
	r.POST("/testpost", Myfunction.Hello2)
	r.POST("/testuname", Myfunction.Hello3)
	r.Run(":9999")
}
